package com.moyun.search.service;

import com.moyun.search.common.result.Result;
import com.moyun.search.common.result.ResultUtil;
import com.moyun.search.dao.mapper.ProjectCategoryMapper;
import com.moyun.search.domain.ProjectCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 项目分类服务
 * @author: zealon
 * @since: 2021/12/24
 */
@Service
public class ProjectCategoryService {

    @Autowired
    private ProjectCategoryMapper projectCategoryMapper;

    public Result getCategoryList(Integer parentId) {
        List<ProjectCategory> list = this.projectCategoryMapper.findPageWithResult(parentId);
        return ResultUtil.success(list);
    }
}
